package com.wlb365.admin.modules.devops.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wlb365.admin.modules.devops.entity.ServiceRoute;
import com.wlb365.admin.modules.devops.mapper.ServiceRouteMapper;
import com.wlb365.admin.modules.devops.service.ServiceRouteService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 路由配置 服务实现类
 * </p>
 *
 * @author
 * @since 2020-04-11 10:14:49
 */
@Service
public class ServiceRouteServiceImpl extends ServiceImpl<ServiceRouteMapper, ServiceRoute> implements ServiceRouteService {

    @Override
    public Page<ServiceRoute> listServiceRoutePage(ServiceRoute serviceRoute) {
        Page<ServiceRoute> page = new Page<>(serviceRoute.getCurrent(), serviceRoute.getSize());
        List<ServiceRoute> serviceRoutes = baseMapper.selectServiceRouteList(serviceRoute, page);
        return page.setRecords(serviceRoutes);
    }

}
